<html>
	<head>
		<meta name="layout" content="main"/>
		<title>Welcome to uTalk</title>
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.css')}" type="text/css"/> 
	</head>
	<body>

		<div class="row">
		 <div id="login_form" class="col-md-6">
		 
			<g:form url="/Talk/" role="form">
			
					<div class="form-group">
					    <label for="exampleInputEmail1">Your pseudo</label>
					    <input type="text" class="form-control" id="exampleInputEmail1" placeholder="Enter pseudo" name="pseudo_connection">
					</div>
					
					<div class="form-group">
					    <label for="exampleInputPassword1">Password</label>
					    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="password_connection">
  					</div>
				
					<button class="btn btn-default" type="submit">Login</button>
					
			</g:form>
			<br/><br/>
			<oauth:connect provider="google"> Connect with your Google Account </oauth:connect>
			
			<g:form controller="user" action="meteoService" role="form">
			
					<input type="text" name="postalCodeText"/>
					<button class="btn btn-default" type="submit">City temperature</button>
					
			</g:form>
			
			<div>${temperature?.cityName }</div>
			<div>${temperature?.temperature }</div>
			
			<div>${flash['login_fail']}</div>
			
		</div>

		<div id="form_register" class="col-md-6">
		
			<div>${flash.register_fail}</div>
			
			<g:form action="register" controller="user" role="form">
			
				 <label class ="title" >Sign In</label>
					<br/><br/>
		
				<div class="form-group">
					    <input type="text" class="form-control" id="exampleInputEmail1" placeholder="Last Name" name="lastName" value="${flash?.nomGoogle}">
				</div>
				
				<div class="form-group">
					    <input type="text" class="form-control" id="exampleInputEmail1" placeholder="First Name" name="firstName" value="${flash?.prenomGoogle}">
				</div>
				
				<div class="form-group">
					    <input type="number" class="form-control" id="exampleInputEmail1" placeholder="Age" name="age">
				</div>
				
				<div class="form-group">
					    <input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pseudo" name="login">
				</div>
				
				<div class="form-group">
					    <input type="password" class="form-control" id="exampleInputEmail1" placeholder="Password" name="pwd1">
				</div>
				
				<div class="form-group">
					    <input type="password" class="form-control" id="exampleInputEmail1" placeholder="Confirm password" name="pwd2">
				</div>
				
				<div class="form-group">
					    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="E-Mail" name="mail" value="${flash?.emailGoogle}">
				</div>
							
				<input type="HIDDEN" name="idGoogle" value="${flash?.idGoogle}">
				<input type="HIDDEN" name="pictureGoogle" value="${flash?.pictureInfo}">
				
				<button class="btn btn-default" type="submit">Sign in</button>
				
			</g:form>			
		</div>
		<%--<div>${flash?.userinfos}</div>
	--%> </div> </body>
</html>